home *** CD-ROM | disk | FTP | other *** search
- Path: goanna.cs.rmit.EDU.AU!not-for-mail
- From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2
- Subject: Re: Hungarian notation - whoops!
- Date: 12 Feb 1996 18:45:44 +1100
- Organization: Comp Sci, RMIT, Melbourne, Australia
- Message-ID: <4fmr78$aov@goanna.cs.rmit.EDU.AU>
- References: <30C40F77.53B5@swsbbs.com> <Pine.HPP.3.91.960124153551.24374C-100000@zeezrom.cs.byu.edu> <4e7ifl$et3@goanna.cs.rmit.EDU.AU> <Pine.HPP.3.91.960129133429.8419C-100000@foggy.cs.byu.edu> <4em29qINN39r@keats.ugrad.cs.ubc.ca> <Pine.HPP.3.91.960201015336.17360C-100000@clear.cs.byu.edu> <4f41vf$g8j@goanna.cs.rmit.EDU.AU> <Pine.HPP.3.91.960205124102.18647E-100000@warm.cs.byu.edu> <4fc157$jsf@goanna.cs.rmit.EDU.AU> <1996Feb8.130010.27570@friend.kastle.com>
- NNTP-Posting-Host: goanna.cs.rmit.edu.au
- NNTP-Posting-User: ok
- X-Newsreader: NN version 6.5.0 #0 (NOV)
-
- I pointed out that none of the machines I normally use supports 16-bit
- little-endian integers, and that some of the machines I could use or
- used to use didn't, don't, or couldn't.
-
- rich@kastle.com (Richard Krehbiel) writes:
- >Seriously? I think you are giving up too early. He did say "whatever
- >it takes".
-
- >A 486SX can do IEEE floating point arithmetic, but it has no floating
- >point unit. It does it with software emulation. C compilers for 8
- >bit micros can somehow multiply and divide even though the CPU only
- >has add, subtract, and shift instructions.
-
- >I suspect that, with a bit of software, even your machines could
- >implement 16 bit little endian integers.
-
- Some of the machines I referred to DO NOT HAVE *ANY* 16-bit storage format.
- The 486SX example is not really relevant, because while the hardware may not
- have floating-point _instructions_, it has load and storage instructions that
- are compatible with the _storage format_.
-
- The multiply and divide example is similarly beside the point.
- The SPARC architecture didn't have an integer multiply or divide instruction
- either (the V8 architecture manual lists them, but not all chips had all of
- the instructions at the time my copy of the manual was released). But that
- doesn't matter: it DID have the requisite _storage formats_. And you will
- note that supplying the operations is the responsibility of the compiler:
- if the compiler didn't compensate for the missing operations, there would
- be no *simple* change to the C source code that could do the job.
-
- There are a lot of ways I could emulate 16-bit little endian integers on
- all of the machines I mentioned, but none of them are even remotely as
- simple as changing a C typedef, which is what the original poster claimed
- to be sufficient. In fact, the easiest way to get such code running on
- the machine I'm using at the moment would be to run it under WABI.
-
- --
- "conventional orthography is ... a near optimal system for the
- lexical representation of English words." Chomsky & Halle, S.P.E.
- Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.
-